// 获取元素
var el = document.querySelector(".click3");
var div = document.querySelector(".jlt2");
var img = document.querySelector(".spear-img");
var video = document.querySelector(".spear-video");
var hide = document.querySelector(".hide");
var spearTop = document.querySelector(".right-head");
var spearFoot = document.querySelector(".right-foot");
// 绑定点击事件
el.onclick = function () {
    div.style.transition = "2s all";
    video.autoplay = false;
    video.loop = false;
    video.muted = false;
    div.style.left = 20 + "%";
    hide.style.display = "none";
};
var arr1 = ["0px 0px", "-587px 0px", "-1185px 0px"];
console.log(spearTop);
var num1 = 0;
var timer;
spearTop.onmouseover = function () {
    timer = setInterval(() => {
        num1 += 1;
        spearTop.style.backgroundPosition = arr1[num1];
        if (num1 >= 2) {
            num1 = 0;
        }
    }, 2000);
};
// spearTop.onmouseout = function () {
//     clearInterval(timer);
// };
// el.addEventListener('click', function () {
//     console.log(123);
// })
